<template>
  <div class="header2">
    <div class="goback" @click="goback"><i class="icon icon-left" v-if="isGoBack"></i></div>
    <div class="title">{{title}}</div>
    <div class="actions"><slot></slot></div>
  </div>
</template>
<script>
  export default{
    props: {
      isGoBack: {
        type: Boolean,
        default: true
      },
      title: {
        type: String,
        default: ''
      }
    },
    methods: {
      goback() {
        if(this.isGoBack) {
          this.$router.go(-1)
        }
      }
    }
  }
</script>
